#pragma once

#include <SDL/SDL.h>
#include "SDLSurface.h"
#include "SDLEvent.h"

class SDLApp : public SDLSurface,public SDLEvent
{
public:
	SDLApp(void);
	SDLApp(int width,int height,int depth,Uint32 flags);
	virtual ~SDLApp(void);

public:
	void SetVideoMode(int width,int height,int depth,Uint32 flags);
	int Run();
	void SetTitle(char* title);
	void SetTitle(char* title,char* icon);
	
public:
	bool OnInit();
	void OnEvent(SDL_Event* Event);
	void OnLoop();
	void OnRender();
	void OnExit();

private:
	int m_width;
	int m_height;
	int m_depth;
	Uint32 m_flags;
	bool m_running;
	char* m_title;
	char* m_icon;

};
